Function loginkey(passwd,account,rand)
	  Dim ret
	  Dim obj	     
	  On Error Resume Next 
      Set   obj   =   CreateObject("Pwusbkey.UsbKey.1") 
      If Err.Number <> 0 Then 
		 loginkey=0		
		 Exit Function
      End If

      Dim ret4
      ret=obj.HMAC_MD5(passwd,rand,Len(rand),ret4)      
      IF ret=0 Then
      	loginkey=ret4
      Else
      	loginkey=ret		
	  End If   		  
End Function